package 程序员面试金典;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;

public class 跳水板 {

    public int[] divingBoard(int shorter, int longer, int k) {
        if (k==0)
            return new int[]{};
        if (shorter==longer)
            return new int[]{shorter*k};
        int[] ints = new int[k + 1];
        for (int i = 0; i <=k; i++) {
            int count = longer * i + shorter * (k - i);
            ints[i]=count;
        }
        return ints;
    }
}
